<template>
    <div>
        <hr>
        <h4>{{msg}}--{{title}}--{{homemsg}}</h4>
        <button @click="run()">home组件run()</button>
        <button @click="headerRun()">headerRun()</button>
        <button @click="parenntFun()">parenntFun()</button>
    </div>
</template>

<script>
export default {
    data(){
        return {
            msg:"这是头部组件"
        }
    },
    methods:{
       headerRun(){
           this.home.run();
       },
       parenntFun(){
           this.$parent.run();
       }
    },
    props:['title','homemsg','run','home']
}
</script>
